var express = require('express')
var bodyParser = require('body-parser')

var router =  require('./router')
var adminRouter = require('./admin')


var app = express()

// 配置模板引擎
app.engine('html', require('express-art-template'))

// 配置 body-parser
app.use(bodyParser.urlencoded({ extended: false }))
app.use(bodyParser.json())

// 开放静态资源文件夹
app.use('/public', express.static('./public'))



// 配置路由
app.use(router)
app.use(adminRouter)

app.listen(3000,'172.17.147.23', function(){
    console.log('blog server running at prot 3000')
})